/*=========================================================================

Program:   Virtual Surgery
Language:  C++
Date:      2009-9-1
Version:   0.1
Mail:		   nelfylee@gmail.com

Copyright (c) 2009 Nelfy Lee. All rights reserved.

=========================================================================*/
#ifndef _CONTROL_PANEL_BASE_H_
#define _CONTROL_PANEL_BASE_H_

#include <QFrame>
#include <QModelIndex>

class Source;
class ControlPanelDock;
class DisplayModel;
class PipelineModel;

enum PanelType{
	ptHome = 1,
	ptSmoothing,
	ptThresholding,
	ptVesselSegmentation,
	ptLiverSegmentation,
	ptSurface,
	ptVolume,
	ptCenterLine,
	ptMaximum
};


class ControlPanelBase : public QFrame
{
public:
	ControlPanelBase(QWidget *parent);
	~ControlPanelBase(){}

	virtual void setSource(const QModelIndex&);
	virtual void setDisplayModel(DisplayModel*);
	virtual void setPipelineModel(PipelineModel*);

	virtual PanelType panelType();

protected:
	Source* currentSource();
	Source* rootSource();

protected:
	PanelType m_panelType;
	QModelIndex m_isource;

	ControlPanelDock *m_parent;
	DisplayModel *m_displayModel;
	PipelineModel *m_pipelineModel;
};


#endif


